//
//  CImageUtil.h
//  PhotoMask
//
//  Created by 为为 on 13-4-15.
//  Copyright (c) 2013年 为为. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CImageUtil : NSObject

+(UIImage*)imageFromFile:(NSString*)fileName;

+(UIImage*)imageFromImage:(UIImage*)image inRect:(CGRect)rect;

+(UIImage*)imageFromImage:(UIImage*)image scaleToSize:(CGSize)size;

+(UIImage*)imageFromView:(UIView *)theView;

+(UIImage *)imageFromImage:(UIImage*)image orName:(NSString*)name withTintColor:(UIColor*)tintColor;

+(UIImage *)combineImage:(UIImage *)desImg fromImage:(UIImage *)srcImg andMask:(UIImage*)maskImage;

+(CGRect)zoomRect:(CGRect)rect withScale:(CGFloat)scale;

+(CGRect)ratioScaleSize:(CGSize)size toRect:(CGRect)rect;

+(CGRect)ratioScaleSize:(CGSize)size overRect:(CGRect)rect;

+(CGRect)rectFromSize:(CGSize)size withRectRatio:(CGRect)rect;


@end
